#ifndef TCP_SERVER_H
#define TCP_SERVER_H

#include <QMainWindow>
#include <QTcpServer>
#include <QTcpSocket>
QT_BEGIN_NAMESPACE
namespace Ui
{
class tcp_server;
}
QT_END_NAMESPACE

class tcp_server : public QWidget
{
    Q_OBJECT

public: tcp_server(QWidget* parent = nullptr);
    ~tcp_server();

private slots:
    void on_openBt_clicked();

    void newConnection_Slot();
    void readyRead_Slot();

    void on_closeBt_clicked();

    void on_pushButton_clicked();

private:
    Ui::tcp_server* ui;
    QTcpServer* m_tcpserver;
    QTcpSocket* m_tcpsocket;
};
#endif // TCP_SERVER_H
